package epfc.tfe.ts.repository;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import epfc.tfe.ts.domain.AbstractDomainObject;
import epfc.tfe.ts.domain.DomainObject;

public interface GenericDao <T extends DomainObject, PK extends Serializable> {

    /** Persist the transientObject object into database */
    public T create(T transientObject);

    /** Retrieve an object that was previously persisted to the database using
     *   the indicated id as primary key
     */
    public T read(PK id);

    /** Save changes made to a persistent object.  */
    public T update(T persistentObject);

    /** Remove an object from persistent storage in the database */
    public void delete(T persistentObject);
    
    public Collection<T> readAll();
    
}